package com.xiaomazi.oss.controller;

import com.xiaomazi.common.utils.R;
import com.xiaomazi.oss.service.OssService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @program: llxy-parent
 * @description: 对象存储前端控制器
 * @author: 小马子
 * @create: 2023-02-14 15:01
 **/
@RestController
@RequestMapping("/eduoss")
public class OSSController {

    @Autowired
    private OssService ossService;

    @PostMapping("/uploadTeacherAvatar")
    public R uploadTeacherAvatar(MultipartFile file){
        return ossService.uploadTeacherAvatar(file);
    }
}
